package com.xindong.paking.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

@Setter
@Getter
@TableName("tb_coupon")
public class Coupon implements Serializable {

    //主键id
    private Integer id;
    //优惠券名称
    private String couponName;
    //优惠券图片
    private String couponIcon;
    //优惠券价值
    private Float couponValue;
    //优惠券类型：1、通用。2、满减券
    private Integer couponType;
    //优惠券数量
    private Integer couponNum;
    //满减券，满多少
    private Float withAmount;
    //折扣：如0.5
    private Float couponDiscount;
    //优惠券描述
    private String couponDes;
    //发放时间
    @JsonFormat(pattern="yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
    @DateTimeFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
    private Date StartTime;

    //过期时间
    @JsonFormat(pattern="yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
    @DateTimeFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
    private Date expirationTime;
    //状态：1、生效，2、失效，3、已结束
    private String status;
    //创建时间
    @JsonFormat(pattern="yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
    @DateTimeFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
    private Date createTime;
    //创建人
    @JsonFormat(pattern="yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
    @DateTimeFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
    private Date updateTime;
    //更新时间
    private String createUser;
    //更新人
    private String updateUser;


}
